<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.henu.col05023.common.CommonUtil"%>
<%@ page import="com.henu.col05023.common.data.Student;"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String result=CommonUtil.nvlToString(request.getAttribute("result"));
%>
<html>
	<head>
		<title>密码修改</title>
		<LINK href="<%=path%>/common/css/admin.css" type="text/css"
			rel="stylesheet">
		<script type="text/javascript">
			function init(){
				document.getElementById("old_p").focus();
			}
			
			function resetAtten(obj){
				var atten=document.getElementById("attention");
			}
		
			function doSave(obj){
				var atten=document.getElementById("attention");
				if(document.getElementById("old_p").value==""){
					atten.innerText="请输入[原始密码]";
					document.getElementById("old_p").focus();
					return ;
				}
				if(document.getElementById("new_p1").value==""){
					atten.innerText="请输入[新密码]";
					document.getElementById("new_p1").focus();
					return;
				}
				if(document.getElementById("new_p1").value!=document.getElementById("new_p2").value){
					atten.innerText="[新密码]和[确认新密码]输入的值不同";
					document.getElementById("new_p2").focus();
					return;
				}
				var obj_form=document.getElementById("_form");
				obj.disabled=true;
				obj_form.submit();
			}
			
		</script>
	</head>
	<body style="text-align: center;" onload="init()"  scroll="no">
		<div id="nav">
			<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
				<TR height=28>
					<TD class="td1">
						当前位置: 个人信息 > 修改口令
					</TD>
				</TR>
				<TR>
					<TD class="td2"></TD>
				</TR>
				<TR height=5>
					<TD class="td3"></TD>
				</TR>
			</TABLE>
		</div>
		<div class="formDiv">
			<table border="0" cellpadding="0" cellspacing="0" class="formTable">
				<!-- 表格标题行-->
				<tr class="tableTitleTR2">
					<td colspan="3">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td class="tableTitleLeft2">
									<span></span>
								</td>
								<td class="tableTitle2">
									口令修改
								</td>
								<td class="tableTitleRight2">
									&#160;
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="formTableL">
					</td>
					<td class="formTableC">
						<form id="_form" name="_form"
							action="<%=path%>/login.do?method=doChangePassword" method="post"
							target="_self">
							<div id="attention" name="attention" style="color:red;text-align:center;padding-top:5px;margin-bottom:-5px;"><%=result %></div>
							<table align="center" border="0" cellpadding="0" cellspacing="2"
								class="formTableCore">
								<tr>
									<td class="formLabel" nowrap style="text-align:right;width:50%;padding-right:10px;">
										原始密码
									</td>
									<td class="formField" nowrap>
										<input type="password" name="old_p" id="old_p" value="" maxlength="128" onfocus="resetAtten(this);"/>
									</td>
								</tr>
								<tr>
									<td class="formLabel" nowrap style="text-align:right;width:50%;padding-right:10px;">
										新密码
									</td>
									<td class="formField" nowrap>
										<input type="password" name="new_p1" id="new_p1" value="" maxlength="128" onfocus="resetAtten(this);"/>
									</td>
								</tr>
								<tr>
									<td class="formLabel" nowrap style="text-align:right;width:50%;padding-right:10px;">
										确认新密码
									</td>
									<td class="formField" nowrap>
										<input type="password" name="new_p2" id="new_p2" value="" maxlength="128" onfocus="resetAtten(this);"/>
									</td>
								</tr>
							</table>
						</form>
						<div class="button">
							<a href="javascript:viod(0)" onclick="doSave(this);return false;"><span
								class="span" id="save_button" name="save_button"></span><span class="text">保 存</span> </a>
						</div>
					</td>
					<td class="formTableR">
					</td>
				</tr>
				<tr>
					<td class="formTableLB">
					</td>
					<td class="formTableB">
					</td>
					<td class="formTableRB">
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
